package io.kimmking.dubbo.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@EnableAutoConfiguration
@RefreshScope
public class User_Order_Controller {

    @Value("${consumer_value}")
    private String value;

    @Value("${server.port}")
    private String port;

    @Autowired
    private io.kimmking.dubbo.demo.services.testHystrix testHystrix;

    @RequestMapping("/userAndOrderInfo")
    public String getUserAndOrderInfo(){
        return testHystrix.getUserOrderInfo()
                +": " + value + ": " + port;
    }

}